<style>
    .title{
        font-size: 20px;font-weight: bold;text-align: center;margin: 10px 0;
    }
    .test_block{
        padding: 10px;
        font-size: 14px;
    }
    .block_title{
        font-size: 15px;
        color: #1688f1;
        font-weight: bold;
        display: flex;
        align-items: center;
    }
    .title_score_desc{
        color: crimson;font-size: 12px;
    }
    .question_item{
        margin: 10px 0 10px 10px;
    }
    .question_title{
        display: flex;
        align-items: baseline;
    }
    .text_key{
        margin-right: 5px;
    }
    .answer_list{
        display: flex;
        align-items: baseline;
        margin-left: 10px;
    }
    .answer_item{
        margin: 10px 10px;font-weight: bold;
    }
    .wd_value{
        color: #18bc9c;font-weight: bold;margin-top: 10px;font-size: 18px;border: 1px dashed #18bc9c;padding: 4px;
    }
    .pf_text{
        margin-right: 10px;
    }
    .pf_box{
        display: flex;align-items: center;margin-top: 6px;color: crimson;font-weight: bold;
        border: 1px crimson dashed;padding: 10px;
    }
    .tips{
        color: red;
    }
    .test_tips{
        text-align: right;
    }
    .test_tips span{
        margin-right: 10px;
    }
    .test_tips span b{
        font-size: 22px;color: crimson;
    }
    @media print {
        .block_title_text{
            color: #1688f1 !important;
        }
        .title_score_desc{
            color: crimson !important;
        }
        .tips,.tips b{
            color: red !important;
        }
        .test_tips b{
            color: crimson !important;
        }
        .wd_value{
            color: #18bc9c !important;
        }
        /* 在这里添加针对打印的CSS样式 */
        .no-print {
            display: none; /* 打印时隐藏此类元素 */
        }
    }
</style>
<div class="title">{$test_data.title|htmlentities}</div>
<div class="test_tips">
    <span><i class="fa fa-user-circle"></i> 姓名：<b>{$nickname|htmlentities}</b></span>
    <span><i class="fa fa-wpforms"></i> 分数：<b>{$test_score|htmlentities}</b></span>
    <span class="no-print" style="color: #1688f1;cursor: pointer;" onclick="window.print()"><i class="fa fa-print"></i> 打印</span>
</div>


    <!-- 题型列表 start -->
    {volist name="question" id="v"}
    <div class="test_block">
        <!-- 题型标题 start -->
        {if condition="count($v.question) > 0"}
        <div class="block_title">
            <div class="block_title_text">{$v.number|htmlentities}、{$v.value|htmlentities}</div>
            <div class="title_score_desc">（{$v.total_score_desc|htmlentities}）</div>
        </div>
        {/if}
        <!-- 题型标题 end -->
        <!-- 题目列表 start -->
        <div class="block_question">
            {volist name="v.question" id="v2" key="k2"}
            <div class="question_item">
                <!-- 问题标题 start -->
                {if condition="$v.id != 4"}
                <div class="question_title">
                    <div class="text_key">{$k2|htmlentities}.</div>
                    <div class="text_title">{$v2.title|htmlentities}</div>
                </div>
                {else /}
                <div class="question_title">
                    <div class="text_key">{$k2|htmlentities}.</div>
                    <div class="text_title">
                        {volist name="$v2.title_arr" id="v3"}
                        {if condition="$v3==='(________)'"}
                        <span class="wd_value">{$v2.answer_value[$key]|htmlentities}</span>
                        {else /}
                        <span>{$v3|htmlentities}</span>
                        {/if}
                        {/volist}
                    </div>
                </div>
                <div class="tips">得分：<b>{$v2.ask_score|default=0}</b>；</div>
                {/if}
                <!-- 问题标题 end -->

                <!-- 选择题 start -->
                {if condition="$v.id == 1"}
                <div class="answer_list">
                    {volist name="$v2.option_arr" id="v3" key="k3"}
                    <div class="answer_item {if condition='$v2.answer_value == $v3'}wd_value{/if}">
                        {$v3|htmlentities}
                    </div>
                    {/volist}
                </div>
                <div class="tips">回答：<b>{$v2.ask_status? '正确' : '错误'}</b>；得分：<b>{$v2.ask_score|default=0}</b>；</div>
                {/if}
                <!-- 选择题 end -->
                <!-- 多选题 start -->
                {if condition="$v.id == 2"}
                <div class="answer_list">
                    {volist name="$v2.option_arr" id="v3" key="k3"}
                    <div class="answer_item {if condition='in_array($v3,$v2.answer_value)'}wd_value{/if}">
                        {$v3|htmlentities}
                    </div>
                    {/volist}
                </div>
                <div class="tips">回答：<b>{$v2.ask_status? '正确' : '错误'}</b>；得分：<b>{$v2.ask_score|default=0}</b>；</div>
                {/if}
                <!-- 多选题 end -->
                <!-- 判断题 start -->
                {if condition="$v.id == 3"}
                <div class="answer_list">
                    {volist name="$v2.option_arr" id="v3" key="k3"}
                    <div class="answer_item {if condition='$v2.answer_value == $v3'}wd_value{/if}">
                        {$v3|htmlentities}
                    </div>
                    {/volist}
                </div>
                <div class="tips">回答：<b>{$v2.ask_status? '正确' : '错误'}</b>；得分：<b>{$v2.ask_score|default=0}</b>；</div>
                {/if}
                <!-- 判断题 end -->
                <!-- 问答题 start -->
                {if condition="$v.id == 5"}
                <div class="answer_list">
                    <div class="wd_value">{$v2.answer_value|htmlentities}</div>
                </div>
                <div class="tips">得分：<b>{$v2.ask_score|default=0}</b>；</div>
                {/if}
                <!-- 问答题 end -->

            </div>
            {/volist}
        </div>
        <!-- 题目列表 end -->
    </div>
    {/volist}
    <!-- 题型列表 end -->












